package edu.neu.agv_backend.service;

import edu.neu.agv_backend.dto.AjaxResult;
import edu.neu.agv_backend.remote.RemoteClient;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;

@Service
public class SystemCheckService {
    private final RemoteClient client;

    public SystemCheckService(RemoteClient client) {
        this.client = client;
    }

    public AjaxResult<Void> checkFs() {
        ResponseEntity<AjaxResult> resp = client.get("/system/check/fs", AjaxResult.class);
        return resp.getBody();
    }

    public AjaxResult<Void> checkDb() {
        return client.get("/system/check/db", AjaxResult.class).getBody();
    }

    public AjaxResult<Void> checkAgv() {
        return client.get("/system/check/agv", AjaxResult.class).getBody();
    }

    public AjaxResult<Void> checkCam() {
        return client.get("/system/check/cam", AjaxResult.class).getBody();
    }
} 